// 学生信息数据接口
import request from '@/utils/request'

export function scoreListApi(data) {
  return request({
    url: '/allResults',
    method: 'get',
    data: data
  })
}
// 专业接口
export function majorsListApi() {
  return request({
    url: '/getMajors.do',
    method: 'get'
  })
}

export function addMajorsApi(data) {
  return request({
    url: '/addMajors.do',
    method: 'post',
    data: data
  })
}

export function deleteMajorsApi(data) {
  return request({
    url: '/deleteMajors.do',
    method: 'post',
    data: data
  })
}

export function upMajorsApi(data) {
  return request({
    url: '/updateMajors.do',
    method: 'post',
    data: data
  })
}
// 班级接口
export function getClassesApi() {
  return request({
    url: '/getClasses.do',
    method: 'get'
  })
}

export function addClassesApi(data) {
  return request({
    url: '/addClass.do',
    method: 'post',
    data: data
  })
}

export function updateClassApi(data) {
  return request({
    url: '/updateClass.do',
    method: 'post',
    data: data
  })
}

export function deleteClassesApi(data) {
  return request({
    url: '/deleteClasses.do',
    method: 'post',
    data: data
  })
}
// 科目接口
export function getSubjectsListApi() {
  return request({
    url: '/selectSubjects.do',
    method: 'get'
  })
}

export function updateSubjectApi(data) {
  return request({
    url: '/updateSubject.do',
    method: 'post',
    data: data
  })
}

export function deleteSubjectApi(data) {
  return request({
    url: '/deleteSubject.do',
    method: 'post',
    data: data
  })
}

export function addSubjectApi(data) {
  return request({
    url: '/addSubject.do',
    method: 'post',
    data: data
  })
}
// 学生信息接口
export function getStudentsApi() {
  return request({
    url: '/getStudents.do',
    method: 'get'
  })
}
export function addStudentsApi(data) {
  return request({
    url: '/addStudent.do',
    method: 'post',
    data: data
  })
}
export function deleteStudentsApi(data) {
  return request({
    url: '/deleteStudents.do',
    method: 'post',
    data: data
  })
}
export function updateStudentApi(data) {
  return request({
    url: '/updateStudent.do',
    method: 'post',
    data: data
  })
}
// 成绩表接口
export function getScoreListApi() {
  return request({
    url: '/getScoreList.do',
    method: 'get'
  })
}
export function getScoreResultDataApi() {
  return request({
    url: '/getScoreResultData.do',
    method: 'get'
  })
}

// 考试表接口
export function geTestsApi() {
  return request({
    url: '/geTests.do',
    method: 'get'
  })
}
export function addTestApi(data) {
  return request({
    url: '/addTest.do',
    method: 'post',
    data: data
  })
}

export function deleteTestApi(data) {
  return request({
    url: '/deleteTest.do',
    method: 'post',
    data: data
  })
}

export function updateTestApi(data) {
  return request({
    url: '/updateTest.do',
    method: 'post',
    data: data
  })
}
